Many computer programs contain conditional codes (e.g., if-then-else structure), which are also referred to as “branch.” Thus, when the execution of the code arrives at the branch, based on a condition, one of two or more possible paths is taken.
A branch predictor is a digital circuit that aims to predict which way a branch will take, before a condition associated with the branch has been actually calculated and a conditional jump has passed the execution stage in the instruction pipeline. Such a prediction of the branch, for example, improves the flow in one or more associated instruction pipelines. Without branch prediction, a processor would have to wait until the conditional jump instruction has passed the execute stage before the next instruction can enter the fetch stage in the pipeline.